// ============================================================================
//
// Graph framework by Aurelien Moreau aurelien.moreau@gmail.com
// Modified by Pierre CHATEL chatelp@gmail.com
// Distributed under LGPL
// Copyright (C) Aurelien Moreau, 2008, 2009. All rights reserved
//
// ============================================================================

package com.thalesgroup.graphFramework.sortMethods;

import java.util.Comparator;

import com.thalesgroup.graphFramework.core.Vertex;
import com.thalesgroup.graphFramework.searchMethods.DepthFirstSearch;

public class ProcessedDateReverseOrderComparator <S, T> implements Comparator<Vertex<S, T>>{
	
	public int compare(Vertex<S, T> v1, Vertex<S, T> v2) {
		int v1date = (Integer) v1.getUserFeature(DepthFirstSearch.processedDateKey);
		int v2date = (Integer) v2.getUserFeature(DepthFirstSearch.processedDateKey);

		return v2date - v1date;
	}
}
